home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16106 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  4.4 KB

  1. Path: alfa.ist.utl.pt!l36686
  2. From: l36686@alfa.ist.utl.pt (Ricardo Manuel Antunes Vinagre)
  3. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  4. Subject: Re: Young programmers read me.
  5. Followup-To: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  6. Date: 9 Apr 1996 15:39:23 GMT
  7. Organization: Instituto Superior Tecnico 
  8. Message-ID: <4ke0bb$7ot@ci.ist.utl.pt>
  9. References: <4icpp9$7hr@barad-dur.nas.com> <4imqe4$cj3@ping1.ping.be> <1996Mar23.224853.116513@kuhub.cc.ukans.edu> <4j52hn$ikb@news.ios.com> <Pine.OSF.3.91.960403112207.17337H-100000@bud.cc.swin.edu.au> <aidan-0404961557290001@meathook.intac.com> <pnoguchi-0404962135210001@pnoguchi.his.com> <aidan-0604961847480001@meathook.intac.com>
  10. NNTP-Posting-Host: alfa.ist.utl.pt
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Aidan Cully (aidan@genghis.kublai.com) wrote:
  14. : > programmer to do. Unlike Pascal, C/C++ compilers usually assume a
  15. : > programmer is intelligent enough to capture most bugs in a program, which
  16. : > is a good reason for loose syntax. Besides which, if you have so much
  17. : > trouble with C/C++, is that a failing of the language, or your programming
  18. : > skills?
  19.  
  20. : Here you point out one of my greatest objections to the language as though
  21. : it were a feature...  I agree that a programmer should be able to find his
  22. : own bugs, but loose syntax is just pointless, and makes the bug-hunt just
  23. : so much harder.
  24.  
  25. It's not hard to go a little furter and arrive to the conclusion:
  26.     Flexibility and/or Speed == Bigger holes in the language
  27.  
  28. You can't expect to be able, for instance, to freely use pointers without
  29. the danger of "writing in the wrong place".
  30.  
  31. To get things like safe arrays, there are plenty of freeware C++ Array
  32. classes with auto-bonds-checking. Of curse you will make slower programs,
  33. but thats what you get when you want a bullet-proof language.
  34.  
  35. : I don't think that anyone should have the right to feel
  36. : macho about being able to figure out how to program in one language while
  37. : others can't unless the language has some spiffy new layer of abstraction
  38. : or something that people can't deal with (e.g. OOP), but otherwise it
  39. : seems like the language is badly designed.  After gaining a mastery of
  40. : C++, then learning other OOP languages, I have come to the conclusion that
  41. : C++ is badly designed.  For example, Function pointer will return an
  42. : integer, takes two ints as parameters.  In C/C++
  43. :    typedef (int*)(int a, int b) MyFuncType;
  44. :    MyFuncType MyFunc;
  45. : in Oberon
  46. :    TYPE
  47. :       MyFuncType:FUNCTION( a, b:INTEGER ):INTEGER;
  48. :    VAR
  49. :       MyFunc:MyFuncType;
  50. : Which do you think looks more readable?
  51.  
  52. The second - but i did learn Pascal ...
  53.  
  54. Of curse there are some things in C++ people don't use that make life really
  55. easy - for instance here's how you test a stream named "mystream" for any
  56. kind of error:
  57.  
  58. if( !mystream ){
  59.     // Error ...
  60. }
  61.  
  62. If you know C++ and want to learn some more, how about reading again the best
  63. book you ever read about it - i did, and found out some usefull thing i had
  64. never used before... 
  65.  
  66. : BTW, I have absolutely no trouble programming in C++, and I have said that
  67. : I am writing a game in C++, but this is only for speed and the compiler is
  68. : readily available, and all the spiffy things I can do with built in ASM
  69. : support.  And all I ever said was that as a *language*, C++ blows.  Not at
  70. : compiled program size and speed.
  71.  
  72. If your only trouble is speed and executable size, and you think that C++ 
  73. "blows" as language, then you better try Assembly - that generates the 
  74. faster and smaller executables i have ever seen!!!
  75.  
  76. Of curse it will give the biggest headache you have ever had.. 
  77.  
  78. --
  79. *-----------------------------------------------------------------------*
  80. | RRRRR V       VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV  |
  81. | R   R  V     V                                                        |
  82. | RRRR    V   V       A Student of Electronics at Instituto Superior    |
  83. | R  R     V V          Tecnico - LISBON - PORTUGAL                     |
  84. | R   R     VINAGRE                                |
  85. |                                    |
  86. |     Try out my WWW Home page - http://alfa.ist.utl.pt/~l36686/        |
  87. \_______________________________________________________________________/
  88. |   Tired of Microsoft OS's - Try out Linux!!! - it doesn't have that   |
  89. |               much advertising but it's great anyway                  |
  90. *-----------------------------------------------------------------------*
  91.  
  92.  
  93.